﻿
Public Class Form1

    Public cs As CustomerCost = New CustomerCost()





    Private Sub btnSubmit_Click(sender As System.Object, e As System.EventArgs) Handles btnSubmit.Click
        Dim response As MsgBoxResult

        response = MsgBox("Are you sure!", MsgBoxStyle.OkCancel, "AAAAA")
        If response = MsgBoxResult.Ok Then
            cs.numberOfDays = Val(tbDays.Text)
            cs.numberOfGuests = Val(tbGuests.Text)
            cs.checkInBefore = cbCheckIn.Checked
            cs.chekOutAfer = cbCheckOut.Checked
            cs.CountAmountofCharge()
            cs.CountChareForExtraUser()
            cs.CountChareForExtraUser()
            tbDiscount.Text = cs.totalAmountDiscount
            tbDaysStay.Text = cs.numberOfDays.ToString
            tbAmountCharge.Text = cs.amountOfCharge.ToString
            tbExtraGuest.Text = cs.totalChargeForExGuest.ToString

        End If

    End Sub

    Private Sub rbSuit_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles rbSuit.CheckedChanged

    End Sub

    Private Sub rbDouble_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles rbDouble.CheckedChanged
        cs.typeOfRoom = 2
    End Sub

    Private Sub rbSingle_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles rbSingle.CheckedChanged
        cs.typeOfRoom = 1
    End Sub

    Private Sub btnClear_Click(sender As System.Object, e As System.EventArgs) Handles btnClear.Click
        cs.Clear()
        tbGuests.Text = ""
        tbDays.Text = ""
        cbCheckIn.Checked = False
        cbCheckOut.Text = False
        rbDouble.Checked = False
        rbSingle.Checked = False
        rbSuit.Checked = False
    End Sub
End Class
